package com.qianfeng.smartdevice.controller;

import com.qianfeng.smartdevice.dto.R;
import com.qianfeng.smartdevice.service.SysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by wenka on 2022/3/27 16:53
 *
 * @author Jackiechan
 * @version 1.0
 * @since 1.0
 */
@RestController
@RequestMapping("/menus")
public class SysMenuController {
    private SysMenuService sysMenuService;

    @Autowired
    public void setSysMenuService(SysMenuService sysMenuService) {
        this.sysMenuService = sysMenuService;
    }

    @GetMapping("/menus")
    public R findAllLeftMenu() {
        return R.setOK(sysMenuService.findAllLeftMenu());
    }
}
